<?
require_once("./init.php");
if(isset($_GET["admin"]))
{
	$_SESSION["admin"]=1;
}
if($_GET["mem"])
{
	$_SESSION["admin"]=0;
}
$q=query("select * from other where code='openweb'");
$r=fetch($q);
$e=array("vnths-2013","gui-bai-du-thi");
if($_SESSION["admin"]==1)
{
	echo "<div style='position:fixed;color:#fff;background:#000;padding:5px 15px 5px 15px;right:0px;cursor:pointer;' onclick='location.href=\"index.php?mem=1\"'>Thoát ADMIN</div>";
}
if($r["content1"]!=1 && !in_array($_GET['code'],$e) &&$_SESSION["admin"]!=1)
{
	include_once(MODULES. 'webclose.php');
}
elseif(isset($_GET['act']) && $_GET['act']!="")
	include_once(MODULES. 'main.php');
else
	include_once(MODULES. 'home.php');
?>